<?php
/*
 * File Name : buygoldstarinsert.php
 * Description : This page allows the donor to insert the values in the 
 * transaction table.
 */
include_once "basePage.php";
class buygoldstarinsert extends basePage{
	 public function insertvalues()
	 
	 {
	 	$tname = $_POST['transaction_id'];
		$sname = $_POST['Source'];
		$dname = $_POST['destination'];
		
    	 $con = mysql_connect("localhost","pa_user","secret_password");
    	 if (!$con)
       		{
               die('Could not connect: ' . mysql_error());
      		 }
    	   mysql_select_db("tgs_gm_reservation", $con);
    	   		
    	   
    	   $sql="INSERT INTO tgs_gm_reservation.tbltransactions (TransactionID, Source, Destination)VALUES('{$tname}','{$sname}','{$dname}')";
	 }

    	   public function closeConn()
	 		{
	   			 mysql_close($con);
			}
    	   
}
$page = new buygoldstarinsert();
$page->header();
$page->top_menu_donor();
$page->insertvalues();
//$page->viewhistory();
//$page->facebook_post();
$page->footer();


?>